Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 3 - Text Encoding Converter Reference / Text Encoding Converter Functions
Investigating Encodings /


TECCountAvailableSniffers

Counts and returns the number of sniffers available in all installed plug-ins.

pascal OSStatus TECCountAvailableSniffers (
                     ItemCount *numberOfEncodings);
numberOfEncodings
A pointer to a value of type ItemCount. On output, this value indicates the number of sniffers in all installed plug-ins.
function result
A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than noErr, then one of the text conversion plug-ins encountered an error when polled for available sniffers.
DISCUSSION
The TECCountAvailableSniffers function counts and returns the number of sniffers that you can use to perform a determination of the current text encoding. This number tells you what size array you must allocate in a parameter of the function TECGetAvailableSniffers (page 84).

TECCountAvailableSniffers counts each instance of the same sniffer. That is, if different conversion plug-ins support a sniffer for the same text encoding, this function includes each instance of the sniffer in its sum. Consequently, one type of sniffer may be counted more than once. However, since the TECGetAvailableSniffers function does not return duplicate text encoding specifications, TECCountAvailableSniffers may return a number greater than the number of array elements required.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997